<?php
/**
 * Author: Hancock
 * Email: 84622365@qq.com
 * Date: 3/23/2016
 * Des: 配置
 */
defined('INHkMvc') or exit('Access Invalid!');
class Config{
    private static $config;
    private static $app_config;
    static public function get(){
        self::getConfig();
        self::getAppConfig();
        return array_merge(self::$config, self::$app_config);
    }
    static private function getConfig(){
        @include(ROOT_PATH  .'config/config.ini.php');
        self::$config = $config;
    }
    static private function getAppConfig(){
        @include(ROOT_PATH . APP . SEPARATE.'config/config.ini.php');
        self::$app_config = $config;
    }
    static public function dbConfig($config){
        if(is_array(reset($config))){
            return array_shift($config);
        }else{
            return $config;
        }
    }
}
